<template>
  <div id="details">
    <div class="dv">
      <div class="iconfont dv-0" @click="back">&#xe84f;</div>
      <my-header :title="title" class="dv-1">
      </my-header>
      <div class="iconfont dv-2"></div>
    </div>
    <swiper1 :list="swiper"></swiper1>
  </div>
</template>
<script>
import myHeader from "@/components/headers/myheader";
import swiper1 from "@/components/swiper/swiper1";

export default {
  name: '',
  props: {},
  data() {
    return {
      title: '',
      swiper: []
    };
  },
  // 子组件转换
  components: {swiper1, myHeader},
  // 数据引入
  mounted() {
    this.$axios({
      method: 'get',
      url: 'http://api.com/detail'
    }).then((response) => {
      this.swiper = response.data.swiper;
      console.log(this.swiper)
    }).catch(function (error) {
      alert(error)
    })
  },
  created() {
  },
  //点击函数事件
  methods: {
    back() {
      this.$router.go(-1)
    }
  },
  //计算事件
  computed: {},
  //数据监听
  watch: {},
  //过滤器
  filters: {},
  //设定自定义指令
  directives: {},
}
</script>
<style lang="scss" scoped>

.dv {
  width: 100%;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  font-size: .4rem;
  background: rgba(0, 0, 0, 0);
  z-index: 99;
  position: fixed;
  top: 0;
  left: 0;

  div {
    height: 8vh;
    display: inline-block;
    box-sizing: content-box;
  }

  .dv-1 {
    height: 2vh;
    line-height: 4vh;
  }

  .dv-0 {
    width: .5rem;
    height: .4rem;
    background: rgba(160, 160, 160, .5);
    padding: .4rem;
    font-size: .4rem;
    line-height: .4rem;
    color: red;
    margin: .4rem;
    border-radius: 1rem;
  }
}
</style>